<!-- 超级银行家用户管理页面 -->
<div class="row wrapper border-bottom white-bg page-heading">
	<div class="col-md-12">
		<ol class="breadcrumb">
			<li><a>主页</a></li>
			<li><a>对账管理</a></li>
			<li class="active"><strong>代理商分润月表</strong></li>
		</ol>
	</div>
</div>
<!-- 主要内容 -->
<div class="wrapper wrapper-content animated fadeIn" ng-app
	ng-controller="billShareReportCtrl">
	<form class="form-horizontal" id="form1">
		<div class="row">
			<div class="col-lg-12">
				<div class="">
					<div class="panel-body ibox float-e-margins">
						<div class="ibox-content">
							<div class="ibox-title">
								<h5>代理商分润月表</h5>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">汇总批次号:</label>
								<div class="col-sm-2">
									<input type="text" class="form-control" ng-model="info.batchNo">
								</div>
								<label class="col-sm-2 control-label">一级代理商编号:</label>
								<div class="col-sm-2">
									<input type="text" class="form-control"
										ng-model="info.oneAgentNo">
								</div>
								<label class="col-sm-2 control-label">一级代理商名称:</label>
								<div class="col-sm-2">
									<input type="text" class="form-control"
										ng-model="info.oneAgentName">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">分润汇总金额:</label>
								<div class="col-sm-5">
									<input type="number" class="form-control"
										ng-model="info.sShareAmount"
										style="width: 40%; display: inline-block;"> ~ <input
										type="number" class="form-control" ng-model="info.eShareAmount"
										style="width: 40%; display: inline-block;">
								</div>
								<label class="col-sm-2 control-label">保单月份:</label>
								<div class="col-sm-2">
									<input id="d5241" class="form-control" type="datetime"
										ng-model="info.billMonth" onchange=""
										style="width: auto; display: inline-block;"
										onFocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyyMM'})" />

								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">入账时间:</label>
								<div class="col-sm-5">
									<input id="d5241" class="form-control" type="datetime"
										ng-model="info.sAccountTime" onchange=""
										style="width: auto; display: inline-block;"
										onFocus="var d5242=$dp.$('d5242');WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked:function(){d5242.focus();},maxDate:'#F{$dp.$D(\'d5242\')}'})" />
									~ <input id="d5242" class="form-control" type="datetime"
										ng-model="info.eAccountTime" onchange=""
										style="width: auto; display: inline-block;"
										onFocus="WdatePicker({skin:'whyGreen',dateFmt: 'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'d5241\')}'})" />
								<br/><span><font color="#999">备注：查询范围不能超过三个月</font></span>
								</div>
								<label class="col-sm-2 control-label">入账状态:</label>
								<div class="col-sm-2">
									<select class="form-control" ng-model="info.accountStatus"
										ng-options="x.value as x.text for x in accountStatusList"></select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">代理商类型:</label>
								<div class="col-sm-2">
									<select class="form-control" ng-model="info.agentType"
										ng-options="x.value as x.text for x in agentTypeAll"></select>
								</div>
							</div>
							<div class="form-group" style="margin-top: 30px">
								<div class="col-sm-12">
									<label class="col-sm-2 control-label"></label>
									<button class="btn btn-primary6 btn-mr20" type="button"
										ng-click="query()">查询</button>
									<button class="btn btn-primary3 btn-mr20" type="button"
										ng-click="clear()">清空</button>
									<button class="btn btn-new btn-mr20" type="button"
										ng-click="showReportModal()" ng-show="hasPermit('shareReport.report')" >按月汇总</button>
									<button class="btn btn-new btn-mr20" type="button" ng-show="hasPermit('shareReport.account')" ng-click="batchAccount()">批量入账</button>
									<button class="btn btn-primary7 btn-mr20" type="button" ng-show="hasPermit('shareReport.importDetail')" ng-click="exportInfo()" >导出</button>
								</div>
							</div>
						</div>
					</div>
					<div class="panel-body ibox float-e-margins">
						<div class="ibox-title">
							<div class="ibox-content">
								<div class="form-group">
									<div class="col-sm-3 checkbox">
										汇总：累计分润金额：<span ng-bind="totalInfo.totalAmount | currency:''"></span>元
									</div>
									<div class="col-sm-3 checkbox">
										已入账：<span ng-bind="totalInfo.accountAmount | currency:''"></span>元
									</div>
									<div class="col-sm-3 checkbox">
										未入账：<span ng-bind="totalInfo.unAccountAmount | currency:''"></span>元
									</div>
								</div>
								<div class="gridStyle" ui-grid="reportGrid" ui-grid-selection
									ui-grid-pagination ui-grid-resize-columns ui-grid-pinning></div>
								<div ng-show="loadImg" class="timg"></div>
							</div>
						</div>
						<div style="height: 30px"></div>
					</div>
				</div>
			</div>
		</div>
	</form>
	<!-- 直清商户导入 -->
	<div id="initReportModal" class="modal fade" tabindex="3" role="dialog">
		<div class="modal-dialog" style="height: 250px; width: 500px">
			<div class="modal-content" style="height: 250px; width: 500px">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						&times;</button>
					<h3 class="modal-title">按月汇总</h3>
				</div>
				<div class="modal-body">
					<div class="form-group">
						<label class="col-sm-4 control-label"
							style="line-height: 36px; width: 145px;">选择保单产生月份:</label>
						<div class="col-sm-1">
							<input class="form-control" type="datetime"
								ng-model="info.reportMonth" onchange=""
								style="width: auto; display: inline-block;"
								onFocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyyMM'})" />
						</div>
					</div>
				</div>

				<div class="form-group" style="margin-top: 50px">
					<div class="col-sm-10">
						<label class="col-sm-3 control-label"></label>
						<button class="btn btn-primary btn-mr20" type="button"
							ng-click='initShareReport()'>确定</button>
						<button class="btn btn-primary4" type="button" ng-click='cancel()'>取消</button>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</div>